﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShellInfrastructure;
using ModuleExternalProducersDetail.Views;
using Microsoft.Practices.Unity;
using ModuleExternalProducersDetail.ViewModels;
using Microsoft.Practices.Prism.Regions;
 

namespace ModuleExternalProducersDetail
{
    public class ExternalProducersDetailModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.RightRegionName, () => UnityContainer.Resolve<IProducerDetailView>());

        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IProducerDetailView, ProducersDetailView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProducerDetailViewModel, ProducerDetailViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
